package com.qdrtme.landemo.api;

import android.content.Context;

import com.qdrtme.landemo.BaseApi;

import org.json.JSONException;

import java.util.HashMap;

/**
 * @Created by taylor on 12/11/17.
 * @class 登录接口
 */

public class LoginApi extends BaseApi {

    private String mobile;
    private String password;
    private String mobileInfo;
    private String platform;
    private String tenantid;

    public LoginApi(Context c) {
        super(c);
    }


    @Override
    protected String getURL() {
        return BaseApi.LOGIN;
    }

    @Override
    protected void getParams(HashMap<String, Object> params) {
        super.getParams(params);
        params.put("mobile", mobile);
        params.put("password", password);
        params.put("mobileInfo", mobileInfo);
        params.put("platform", platform);
        params.put("tenantid", tenantid);
    }

    @Override
    protected boolean analysisOutput(String result) throws JSONException {
        return true;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public void setMobileInfo(String mobileInfo) {
        this.mobileInfo = mobileInfo;
    }

    public void setPlatform(String platform) {
        this.platform = platform;
    }

    public void setTenantid(String tenantid) {
        this.tenantid = tenantid;
    }
}
